//
//  Tweet.m
//  Coding_My
//
//  Created by showXxie on 2017/8/21.
//  Copyright © 2017年 sooxie. All rights reserved.
//

#import "Tweet.h"

@implementation Tweet

//是否喜欢
- (BOOL)hasLikesOrRewards{
    return (_likes.integerValue + _rewards.integerValue) > 0;
}
- (void)changeToLiked:(NSNumber *)liked {
    
    if (liked == nil) {
        return;
    }
    
    if (!_liked || ![_liked isEqualToNumber:liked]) {
       
        _liked = liked;

        if (_liked.boolValue) {//喜欢

            NSLog(@"喜欢");
        }else {//不喜欢
            NSLog(@"不喜欢");

        }

    }
    
    
}
@end
